package poly;

public class text
{
	public void catsh(Animal animal)
	{
		System.out.println("抓兔子");
		animal.run();
		if(animal instanceof people)
		{
			people people = (people) animal;
			people.speak();
			((people) animal).speak();
		}
		System.out.println("抓到了");
	}
	public static void main(String[] args)
	{
		System.out.println("===");
		text text = new text();
		dog dog = new dog();
		text.catsh(dog);
		people people = new people();
		text.catsh(people);
		Animal ani = new people();
		ani.run();
	}
}
